﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Diploma.Models;
using DiplomaWeb.Models.Student;

namespace DiplomaWeb.Models.Developer
{
    public class ChangePasswordDeveloperViewModel
    {
        public ChangePasswordDeveloperViewModel()
        {
            UsersSelectList = DataManager.Instance.UsersRepository.GetUsers().OrderBy(r => r.Email).Select(r => new SelectListItem
                                                                                              {
                                                                                                  Value = r.UserId.ToString(),
                                                                                                  Text = String.Format("{0} - {1}", r.Email, r.FullName)
                                                                                              });
        }

        public IEnumerable<SelectListItem> UsersSelectList { get; set; }
        public Guid SelectedUserId { get; set; }
        public string NewPassword { get; set; }

        public bool IsSaved { get; set; }
    }
}